<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3c.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<f:view>
	<h:head>
		<link type="text/css" rel="stylesheet" href="themes/bluesky/skin.css" />
		<link type="text/css" rel="stylesheet"
			href="resources/css/wienerhelden.css" />
	</h:head>
	<h:body>
		<ui:composition template="template.xhtml">
			<ui:define name="content">


				<h:form id="form1">

					<h3>Task assigned to me (That is your Task)</h3>

					<p:dataTable id="list3" var="task"
						value="#{poolController.tasksFromUser()}">

						<p:column headerText="Process Id">
							<h:outputText value="#{task.executionId}" />
						</p:column>

						<p:column headerText="Task ID">
							<h:outputText value="#{task.id}" />
						</p:column>

						<p:column sortBy="#{task.name}" headerText="Name">
							<h:outputText value="#{task.name}" />
						</p:column>

						<!-- 
						        <p:column headerText="Owner">  
						            <h:outputText value="#{task.owner}" />  
						        </p:column>  
						   		-->

						<p:column headerText="Assignee">
							<h:outputText value="#{task.assignee}" />
						</p:column>

						<p:column sortBy="#{task.createTime}" headerText="Date Created">
							<h:outputText value="#{task.createTime}" />
						</p:column>

						<p:column headerText="Description">
							<h:outputText value="#{task.description}" />
						</p:column>

						<!--
						        <p:column headerText="Info">  
						            <h:outputText value="#{poolController.getProcessInfo(task)}" />  
						        </p:column>
						          -->

						<p:column id="but1" style="width:4%">
							<p:commandButton id="buttonUnassign" value="Unassign"
								update=":form1" action="#{poolController.unassignTask(task)}"
								icon="ui-icon-person" title="Unassign Task" />
						</p:column>

						<p:column id="but2" style="width:4%">
							<p:commandButton id="buttonHandle" value="Handle" update=":form1"
								action="#{poolController.handleTask(task)}" icon="ui-icon-play"
								title="Handle Task" />
						</p:column>

					</p:dataTable>
				</h:form>

			</ui:define>
		</ui:composition>
	</h:body>
</f:view>
</html>
